package com.example.desinger.designPattern.dutymodel;

import com.example.desinger.common.R;
import com.example.desinger.entity.HomeRemark;

public class SaveRemarkHandler extends AbstractHandler {
    @Override
    public R<String> handle(HomeRemark homeRemark) {
        boolean save = save(homeRemark);
        if (save && nextHandler != null) {
            return nextHandler.handle(homeRemark);
        }
        return R.error("未知错误");
    }

    private boolean save(HomeRemark homeRemark) {
        // 这里添加具体的保存逻辑
        return true; // 示例返回值
    }
}